package WaitNotify;

public class GetLock {
    public static void main(String[] args) throws InterruptedException {
        Object object = new Object();
        synchronized (object) {
            //直接调用wait方法会报错，需要获得锁之后才可以调用wait方法
            object.wait();
        }
    }
}
